<?php

class Form_ReminderForm extends Form_Custom_General {

    public function init() {
        $rm_id = $this->createElement('hidden', 'rm_id')
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60"));
        $this->addElement($rm_id);

        $rm_date = $this->createElement('text', 'rm_date')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Please select date")))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60", "readonly" => "readonly", "class" => "span6 datepicker", "placeholder" => "Date"));
        $this->addElement($rm_date);
        
        
        $rm_title = $this->createElement('text', 'rm_title')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Please enter title")))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60",  "class" => "span6 ", "placeholder" => "Title"));
        $this->addElement($rm_title);

        

        $rm_note = $this->createElement('textarea', 'rm_note')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Please enter note")))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array("size" => "60", "cols" => "50", "rows" => "3", "class" => "span6", "placeholder" => "Note"));
        $this->addElement($rm_note);

        $rm_status = $this->createElement('select', 'rm_status')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Please select status")));
        $this->addElement($rm_status);

        $submit = $this->createElement('submit', 'Save')
                ->setAttribs(Array('title' => "Save changes", 'class' => "btn-glow primary"));
        $this->addElement($submit);

        $reset = $this->createElement('reset', 'Reset')
                ->setAttribs(Array('title' => "Save changes and continue to edit", 'class' => "btn-glow primary"));
        $this->addElement($reset);
    }

}